package cn.xiaopengstack.infrastructure.gateway.adapter.port;

import cn.xiaopengstack.domain.trade.adapter.port.ITradePort;
import cn.xiaopengstack.infrastructure.gateway.adapter.GroupBuyNotifyService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * Trade领域对外请求的防腐层实现
 * @author jiangyangang
 */
@Component
public class TradePort implements ITradePort {

    @Resource
    private GroupBuyNotifyService groupBuyNotifyService;

    @Override
    public String groupBuyNotify(String url, JSONObject payload) {
        return groupBuyNotifyService.groupBuyNotify(url, payload.toJSONString());
    }
}
